
var teacher_oclass = echarts.init(document.getElementById('teacher-oclass'));

option = {
  title: {
    text: 'xxx老师所带班级单科图'
  },
  tooltip: {
    trigger: 'axis'
  },
  legend: {
    data: ['最高分', '平均分', '最低分']
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: ['高三一班', '高三四班', '高三五班', '高三十班']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      name: '最高分',
      type: 'line',
      data: [120, 132, 101, 134]
    },
    {
      name: '平均分',
      type: 'line',

      data: [85,63,55,90]
    },
    {
      name: '最低分',
      type: 'line',
      data: [20, 25, 32, 15]
    }
  ]
};
  // 使用刚指定的配置项和数据显示图表。
teacher_oclass.setOption(option);